﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Style x:Key="ParametersStyle" TargetType="Window">
        <Setter Property="Padding" Value="200" />
    </Style>
    
    <SolidColorBrush x:Key="BrushRed" Color="#FF72222B" />
    <SolidColorBrush x:Key="BrushGreen" Color="#FF22722B" />
    <SolidColorBrush x:Key="BrushBlue" Color="#FF222B72" />
    <SolidColorBrush x:Key="BrushOrange" Color="#FF954704" />
    <SolidColorBrush x:Key="BrushViolet" Color="#FF6C226C" />
    <SolidColorBrush x:Key="BrushGray" Color="#FF4D4D4D" />
    <SolidColorBrush x:Key="BrushTransparent" Color="#55000000" />
    
    <SolidColorBrush x:Key="BrushWhite" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="BrushLightRed" Color="#FFC862B3"/>
    <SolidColorBrush x:Key="BrushLightGreen" Color="#FF62C8B3"/>
    <SolidColorBrush x:Key="BrushLightBlue" Color="#FF62B3C8"/>
    <SolidColorBrush x:Key="BrushLightOrange" Color="#FFDAB681"/>
    <SolidColorBrush x:Key="BrushLightViolet" Color="#FFCC82CC"/>
    <SolidColorBrush x:Key="BrushLightGray" Color="#FFB6B6B6"/>

    <!-- Resource dictionary entries should be defined here. -->
	
    <Style x:Key="MediaStyle" TargetType="{x:Type Control}">
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="{x:Null}" />
		<Setter Property="Foreground" Value="White" />
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="0,0,0,0"/>
	</Style>
	
    <LinearGradientBrush x:Key="MediaButtonsBrush" EndPoint="0.5,1" StartPoint="0.5,0">
    	<GradientStop Color="#3F000000" Offset="0"/>
    	<GradientStop Color="#3FFFFFFF" Offset="1"/>
    </LinearGradientBrush>

    <Storyboard x:Key="ButtonHover">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    
    <Storyboard x:Key="ButtonDown">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.8"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.8"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="ButtonUp">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    
    <Style x:Key="MediaButton" TargetType="{x:Type Control}" BasedOn="{StaticResource MediaStyle}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="1" ScaleY="1"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <EventTrigger RoutedEvent="Mouse.MouseEnter">
                <BeginStoryboard Storyboard="{StaticResource ButtonHover}" x:Name="MouseOverBeginStoryboard" />
            </EventTrigger>
            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                <BeginStoryboard Storyboard="{StaticResource ButtonUp}" />
            </EventTrigger>
            <EventTrigger RoutedEvent="Control.GotFocus">
                <BeginStoryboard Storyboard="{StaticResource ButtonHover}" x:Name="GotFocusBeginStoryboard" />
            </EventTrigger>
            <EventTrigger RoutedEvent="Control.LostFocus">
                <BeginStoryboard Storyboard="{StaticResource ButtonUp}" />
            </EventTrigger>
            <Trigger Property="IsMouseCaptured" Value="True">
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource ButtonDown}" />
                    <RemoveStoryboard BeginStoryboardName="MouseOverBeginStoryboard" />
                </Trigger.EnterActions>
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource ButtonUp}" />
                </Trigger.ExitActions>
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="ButtonTemplate" TargetType="{x:Type Button}">
        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True"/>
    </ControlTemplate>
    
    <ControlTemplate x:Key="MediaButtonTemplate" TargetType="{x:Type ContentControl}">
        <UniformGrid Width="Auto" Height="Auto" Background="Transparent" x:Name="grid" RenderTransformOrigin="0.5,0.5">
            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True"/>
        </UniformGrid>
    </ControlTemplate>

    <ControlTemplate x:Key="PrevButtonTemplate" TargetType="{x:Type Button}">
		<Viewbox Width="auto" Height="auto">
			<Canvas Width="120" Height="80" Background="Transparent" RenderTransformOrigin="0.5,0.5">
				<Path Width="37" Height="64" Fill="{StaticResource MediaButtonsBrush}"  Stroke="White" Stretch="Fill" Data="M79.499674,59.377976 C66.700456,47.581 66.700096,47.581 79.499875,35.783953 L85.899802,29.885396 C92.300066,23.986941 98.700058,23.987061 98.700057,29.885341 L98.700058,65.276692 C98.700058,71.174986 92.300066,71.175014 85.899802,65.276602 z" Canvas.Left="60.196" Canvas.Top="8" StrokeThickness="7"/>
				<Rectangle Width="24" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stroke="White" StrokeThickness="7" Canvas.Left="28.196" Canvas.Top="8" RadiusY="7.867" RadiusX="7.867"/>
			</Canvas>
		</Viewbox>
	</ControlTemplate>
	
    <ControlTemplate x:Key="PlayButtonTemplate" TargetType="{x:Type Button}">
		<Viewbox Width="auto" Height="auto">
			<Canvas Width="120" Height="80" Background="Transparent" RenderTransformOrigin="0.5,0.5">
				<Path Width="40.5" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stretch="Fill" Stroke="White" Data="M69.591815,57.941099 C69.591815,57.941099 69.589597,34.197186 69.589597,34.197186 69.832348,29.537903 73.61864,30.275031 77.64777,34.197413 77.64777,34.197413 81.676718,38.119765 81.676718,38.119765 89.734848,45.964194 89.734775,45.964194 81.676737,53.808623 81.676737,53.808623 77.64772,57.73091 77.64772,57.73091 73.61864,61.653048 69.589597,61.653174 69.591815,57.941099 z" Canvas.Left="45" Canvas.Top="8" StrokeThickness="7"/>
			</Canvas>
		</Viewbox>
	</ControlTemplate>
    
    <ControlTemplate x:Key="PauseButtonTemplate" TargetType="{x:Type Button}">
		<Viewbox Width="auto" Height="auto">
			<Canvas Width="120" Height="80" Background="Transparent" RenderTransformOrigin="0.5,0.5">
				<Rectangle Width="24" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stroke="White" StrokeThickness="7" Canvas.Left="32.125" Canvas.Top="9.148" RadiusY="7.867" RadiusX="7.867"/>
				<Rectangle Width="24" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stroke="White" StrokeThickness="7" Canvas.Left="65.493" Canvas.Top="8" RadiusY="7.867" RadiusX="7.867"/>
			</Canvas>
		</Viewbox>
    </ControlTemplate>
    
    <ControlTemplate x:Key="StopButtonTemplate" TargetType="{x:Type Button}">
		<Viewbox Width="auto" Height="auto">
			<Canvas Width="120" Height="80" Background="Transparent" RenderTransformOrigin="0.5,0.5">
				<Rectangle Width="64" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stroke="White" StrokeThickness="7" Canvas.Left="29.5" Canvas.Top="8" RadiusY="7.867" RadiusX="7.867"/>
			</Canvas>
		</Viewbox>
    </ControlTemplate>
    
    <ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
		<Viewbox Width="auto" Height="auto">
			<Canvas Width="120" Height="80" Background="Transparent" RenderTransformOrigin="0.5,0.5">
				<Rectangle Width="24" Height="64" Fill="{StaticResource MediaButtonsBrush}" Stroke="White" StrokeThickness="7" Canvas.Left="65.929" Canvas.Top="8" RadiusY="7.867" RadiusX="7.867"/>
				<Path Width="37.5" Height="64.019" Fill="{StaticResource MediaButtonsBrush}" Stretch="Fill" Stroke="White" Data="M69.834549,57.204132 C69.834549,57.204132 69.834552,34.733395 69.834552,34.733395 69.834549,29.115774 76.234598,29.115873 82.634509,34.733238 82.634509,34.733238 89.034488,40.350942 89.034488,40.350942 95.434746,45.968757 95.434628,45.968757 89.034488,51.58635 89.034488,51.58635 82.634506,57.204131 82.634506,57.204131 76.234598,62.82153 69.834549,62.821891 69.834549,57.204132 z" Canvas.Left="21.499" Canvas.Top="7.981" StrokeThickness="7"/>
			</Canvas>
		</Viewbox>
    </ControlTemplate>
</ResourceDictionary>